package com.xzz.mybatis.generator.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @author: hhz
 * @createDate: 2021-3-12
 */
@Aspect
@Component
@Slf4j
public class MyAspect {
    @Pointcut("@annotation(com.xzz.mybatis.generator.annotation.MyAnnotation)")
    public void myPointCut() {
        //切面
    }

    @Around("myPointCut()")
    public Object around(ProceedingJoinPoint point) throws Throwable {
        System.out.println("myPointCut");
        return null;
    }
}
